﻿@ModelType IEnumerable(Of Soldata.Azox.Models.NewsItem)

<table class="table table-bordered table-hover table-condensed">
    <colgroup>
        <col style="width: 82px;" />
        <col />
        <col style="width: 25px;" />
        <col style="width: 65px;" />
    </colgroup>
    <thead>
        <tr>
            <th>
            </th>
            <th>
                @Html.DisplayNameFor(Function(model) model.Title)
            </th>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @For Each item In Model
            Dim currentItem = item
            @<tr>
                <td>
                    @Html.DisplayFor(Function(m) currentItem.PublishDate)
                </td>
                <td>
                    @Html.ActionLink(currentItem.Title, "edit", New With {.id = currentItem.Id, .returnUrl = Url.Action("index", New With {.pageIndex = Request.QueryString("pageIndex")})}, New With {.title = "Изменить"})
                </td>
                <td>
                    @Html.DisplayFor(Function(m) currentItem.Draft)
                </td>
                <td>
                    <div class="btn-group">
                        <a class="btn btn-mini" href="@Url.Action("details", "archive", New With {.id = currentItem.Id, .area = "news"})" title="Посмотреть"><i class="icon-eye-open"></i></a>
                        <a class="btn btn-mini" href="@Url.Action("delete", "admin", New With {.id = currentItem.Id, .area = "news"})" title="Удалить"><i class="icon-trash"></i></a>
                    </div>
                </td>
            </tr>
        Next
    </tbody>
</table>
